package homework2;

public class Homework02 {
    public static void main(String[] args) {
        Shape shape = ShapeDemo.getShape("圆形");
        shape.erase();
        shape.draw();
        Shape shape1 = ShapeDemo.getShape("三角形");
        shape1.draw();
        shape1.erase();
        Shape shape2 = ShapeDemo.getShape("矩形");
        shape2.draw();
        shape2.erase();
    }
}
interface Shape {
    void draw();
    void erase();
}